//
//  ZGLLotteryRecordController.m
//  ZeegingLottery
//
//  Created by 李曌 on 2018/6/28.
//  Copyright © 2018年 蒂埃里. All rights reserved.
//

#import "ZGLLotteryRecordController.h"
#import "ZGLRecorderView.h"
#import "ZGLRecordDetailController.h"

@interface ZGLLotteryRecordController ()

@property (nonatomic, strong)ZGLRecorderView *recorderView;

@property (nonatomic, copy)NSMutableArray *OrderAllArray;       //全部
@property (nonatomic, copy)NSMutableArray *OrderWaitingArray;   //待开奖
@property (nonatomic, copy)NSMutableArray *OrderAlreadyArray;   //已开奖
@property (nonatomic, copy)NSArray *dataArray;
@end

@implementation ZGLLotteryRecordController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"购彩记录";
    
    self.view.backgroundColor = ViewBackgroundColor;
    
    [self.view addSubview:self.recorderView];
//    [self.recorderView mas_makeConstraints:^(MASConstraintMaker *make) {
//
//        make.top.equalTo(self.view);
//        make.left.equalTo(self.view);
//        make.right.equalTo(self.view);
//        make.bottom.equalTo(self.view);
//
//    }];
    
}


#pragma mark - setupUI

- (ZGLRecorderView *)recorderView
{
    if (!_recorderView) {
        _recorderView = [[ZGLRecorderView alloc]initWithFrame:CGRectMake(0, 0, UI_SCREEN_WIDTH, UI_SCREEN_HEIGHT)];
//        _recorderView = [[ZGLRecorderView alloc] init];
        //传数据
        WS(weakself)
        _recorderView.indexPath = ^(NSIndexPath *indexPath, NSString *url) {
            
            //进入订单记录详情
            ZGLRecordDetailController *detailVC = [[ZGLRecordDetailController alloc]init];
            detailVC.urlString = url;
//            WKWebViewController *detailVC = [[WKWebViewController alloc]init];
//            detailVC.isNavHidden = YES;//隐藏刷新
//            detailVC.buttonFunctionName = @"ContinueToPlay";
//            [detailVC loadWebURLSring:url];
            [weakSelf.navigationController pushViewController:detailVC animated:YES];
            
        };
    }
    return _recorderView;
}


#pragma mark - method

- (void)goBack
{
    [self.navigationController popToRootViewControllerAnimated:YES];
}





- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
